package org.mespilus.mespilusweb;

import java.util.ArrayList;
import java.util.List;

public class TraceFactory {
	protected static TraceFactory instance;
	protected List<String> log;
	
	protected TraceFactory(){
		 log = new ArrayList<String>();
	}
	
	public static TraceFactory getInstance(){
		if(instance==null) instance = new TraceFactory();
		return instance;
	}
	
	public TraceFactory register(String data){
		log.add(data);
		System.out.println(" * "+log.get(log.size()-1));
		return instance;
	}
}
